<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试后台接口</title>
</head>
<body>
<button id="submitinfo">测试接口</button>
<script src="jquery-1.8.3.min.js"></script>
<script>
    $('#submitinfo').click(submitInfo);

    function submitInfo() {
        $.ajax({
            type:'post',
            data:JSON.stringify({name:'sanri'}),
            // data:{name:'sanri'},
            dataType:'json',
            contentType:'application/json',
            url:'/test/postData',
            success:function (data) {
            }
        })
    }
</script>
</body>
</html>